from api.base_api import BaseUserApi


class PurchaseLoadProductsApi(BaseUserApi):

    def __init__(self, yinhangkaId, daikuanId, daikuanGoumaiUuidNumber):
        super().__init__()
        self.url = f'{self.host}/kejiyinhangyewuguanli/daikuanGoumai/save'
        self.method = 'post'
        self.json = {"yinhangkaId": yinhangkaId, "daikuanId": daikuanId,
                     "daikuanGoumaiUuidNumber": daikuanGoumaiUuidNumber,
                     }


class ListLoadProductsApi(BaseUserApi):

    def __init__(self):
        super().__init__()
        self.url = f'{self.host}/kejiyinhangyewuguanli/daikuanGoumai/page?'
        self.method = 'get'
        self.params = {
            "page": "1",
            "limit": 10,
            "sort": "id",
            "licaicanpinGoumaiDelete": "1",
        }
